9.4
CRITICAL CVSS 3.1
CVE-2024-1874
Apache PHP Command Injection Vulnerability
Description

In PHP versions 8.1.* before 8.1.28, 8.2.* before 8.2.18, 8.3.* before 8.3.5, when using proc_open() command with array syntax, due to insufficient escaping, if the arguments of the executed command are controlled by a malicious user, the user can supply arguments that would execute arbitrary commands in Windows shell.

INFO

Published Date :

April 29, 2024, 4:15 a.m.

Last Modified :

June 18, 2025, 9:12 p.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2024-1874 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Fedoraproject fedora
1 Php php
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 CRITICAL [email protected]
Solution
A command injection vulnerability exists; update PHP to a patched version to address this.
  • Update PHP to version 8.1.28 or later.
  • Upgrade PHP to version 8.2.18 or later.
  • Update PHP to version 8.3.5 or later.
Public PoC/Exploit Available at Github

CVE-2024-1874 has a 5 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-1874 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2024-1874 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Proof Of Concept for CVE-2024-1874

PHP Python

Updated: 3 months, 2 weeks ago
2 stars 1 fork 1 watcher
Born at : July 18, 2024, 3:25 p.m. This repo has been linked 1 different CVEs too.

investigating the BatBadBut vulnerability,

C#

Updated: 1 year, 4 months ago
0 stars 0 fork 0 watcher
Born at : April 17, 2024, 4:07 p.m. This repo has been linked 4 different CVEs too.

command injection

Updated: 1 year, 4 months ago
0 stars 0 fork 0 watcher
Born at : April 17, 2024, 5:26 a.m. This repo has been linked 1 different CVEs too.

Config files for my GitHub profile.

config github-config

Updated: 11 months, 1 week ago
0 stars 0 fork 0 watcher
Born at : April 25, 2022, 6:16 a.m. This repo has been linked 6 different CVEs too.

📡 PoC auto collect from GitHub. ⚠️ Be careful Malware.

security cve exploit poc vulnerability

Updated: 17 hours ago
7221 stars 1200 fork 1200 watcher
Born at : Dec. 8, 2019, 1:03 p.m. This repo has been linked 804 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-1874 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-1874 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • Initial Analysis by [email protected]

    Jun. 18, 2025

    Action Type Old Value New Value
    Added CPE Configuration OR *cpe:2.3:a:php:php:*:*:*:*:*:*:*:* versions from (including) 8.3.0 up to (excluding) 8.3.5 *cpe:2.3:a:php:php:*:*:*:*:*:*:*:* versions from (including) 8.1.0 up to (excluding) 8.1.28 *cpe:2.3:a:php:php:*:*:*:*:*:*:*:* versions from (including) 8.2.0 up to (excluding) 8.2.18
    Added CPE Configuration OR *cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:*
    Added Reference Type CVE: http://www.openwall.com/lists/oss-security/2024/04/12/11 Types: Mailing List
    Added Reference Type PHP Group: http://www.openwall.com/lists/oss-security/2024/04/12/11 Types: Mailing List
    Added Reference Type CVE: http://www.openwall.com/lists/oss-security/2024/06/07/1 Types: Mailing List
    Added Reference Type PHP Group: http://www.openwall.com/lists/oss-security/2024/06/07/1 Types: Mailing List
    Added Reference Type CVE: https://github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7 Types: Exploit, Vendor Advisory
    Added Reference Type PHP Group: https://github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7 Types: Exploit, Vendor Advisory
    Added Reference Type CVE: https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ Types: Mailing List
    Added Reference Type PHP Group: https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ Types: Mailing List
    Added Reference Type CVE: https://lists.fedoraproject.org/archives/list/[email protected]/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/ Types: Mailing List
    Added Reference Type PHP Group: https://lists.fedoraproject.org/archives/list/[email protected]/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/ Types: Mailing List
    Added Reference Type CVE: https://security.netapp.com/advisory/ntap-20240510-0009/ Types: Third Party Advisory
    Added Reference Type PHP Group: https://security.netapp.com/advisory/ntap-20240510-0009/ Types: Third Party Advisory
    Added Reference Type CVE: https://www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585 Types: Exploit, Third Party Advisory
  • CVE Modified by [email protected]

    Feb. 13, 2025

    Action Type Old Value New Value
    Changed Description In PHP versions 8.1.* before 8.1.28, 8.2.* before 8.2.18, 8.3.* before 8.3.5, when using proc_open() command with array syntax, due to insufficient escaping, if the arguments of the executed command are controlled by a malicious user, the user can supply arguments that would execute arbitrary commands in Windows shell.  In PHP versions 8.1.* before 8.1.28, 8.2.* before 8.2.18, 8.3.* before 8.3.5, when using proc_open() command with array syntax, due to insufficient escaping, if the arguments of the executed command are controlled by a malicious user, the user can supply arguments that would execute arbitrary commands in Windows shell.
  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference http://www.openwall.com/lists/oss-security/2024/04/12/11
    Added Reference http://www.openwall.com/lists/oss-security/2024/06/07/1
    Added Reference https://github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
    Added Reference https://security.netapp.com/advisory/ntap-20240510-0009/
    Added Reference https://www.vicarius.io/vsociety/posts/command-injection-vulnerability-in-php-on-windows-systems-cve-2024-1874-and-cve-2024-5585
  • CVE Modified by [email protected]

    Jun. 13, 2024

    Action Type Old Value New Value
    Added Reference PHP Group https://lists.fedoraproject.org/archives/list/[email protected]/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/ [No types assigned]
  • CVE Modified by [email protected]

    Jun. 12, 2024

    Action Type Old Value New Value
    Added Reference PHP Group https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ [No types assigned]
  • CVE Modified by [email protected]

    Jun. 10, 2024

    Action Type Old Value New Value
    Added Reference PHP Group https://security.netapp.com/advisory/ntap-20240510-0009/ [No types assigned]
    Added Reference PHP Group http://www.openwall.com/lists/oss-security/2024/06/07/1 [No types assigned]
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    May. 01, 2024

    Action Type Old Value New Value
    Added Reference PHP Group http://www.openwall.com/lists/oss-security/2024/04/12/11 [No types assigned]
  • CVE Received by [email protected]

    Apr. 29, 2024

    Action Type Old Value New Value
    Added Description In PHP versions 8.1.* before 8.1.28, 8.2.* before 8.2.18, 8.3.* before 8.3.5, when using proc_open() command with array syntax, due to insufficient escaping, if the arguments of the executed command are controlled by a malicious user, the user can supply arguments that would execute arbitrary commands in Windows shell. 
    Added Reference PHP Group https://github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7 [No types assigned]
    Added CWE PHP Group CWE-116
    Added CVSS V3.1 PHP Group AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 9.4
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact